#ifndef STX_ALGORITHM_IS_SORTED_HPP
#define STX_ALGORITHM_IS_SORTED_HPP

#include <stx/algorithm/common.hpp>
#include <stx/algorithm/is_sorted_until.hpp>

namespace stx {

template <class ForwardIterator, class Compare>
inline bool
is_sorted(ForwardIterator first, ForwardIterator last, Compare comp)
{
    return stx::is_sorted_until(first, last, comp) == last;
}

template<class ForwardIterator>
inline bool
is_sorted(ForwardIterator first, ForwardIterator last)
{
    return stx::is_sorted(first, last, stx::less<typename std::iterator_traits<ForwardIterator>::value_type>());
}

} // namespace stx

#endif // STX_ALGORITHM_IS_SORTED_HPP
